﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace _043.线程Thread
{
	internal class Program
	{
		static void Test()
		{
			Console.WriteLine("Test:"+Thread.CurrentThread.ManagedThreadId);
		}
		static void Main(string[] args)
		{
			Thread thread = new Thread(Test);
			thread.Start();
			Console.WriteLine("Main:"+Thread.CurrentThread.ManagedThreadId);

			// 匿名线程
			Thread t = new Thread(() =>
			{
				Console.WriteLine("Child Thread:"+Thread.CurrentThread.ManagedThreadId);
			});
			t.Start();

		}
	}
}
